package serveur;

import webservice.*;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;

import partage.*;

public class ServiceChatImpl implements ServiceChat, Runnable {

	private ArrayList<SessionImpl> listeSessionActive = new ArrayList<SessionImpl>();
	private WebServiceService stub = new WebServiceService();
	private	WebService serviceRef = stub.getWebServicePort();
	/**
	 * @param args
	 */
	
	@Override
	public void run() {
		// TODO Auto-generated method stub

		while(true){
			
		}
	}

	@Override
	public boolean connexion(clientAffichage usr, String login, String mdp) throws RemoteException {
		// TODO Auto-generated method stub
		Utilisateur compte = new Utilisateur();
		//faire appel méthde soap
		listeSessionActive.add(new SessionImpl(usr,compte));
		
		return false;
	}

	@Override
	public void afficherMsgTest(clientAffichage usr) throws RemoteException {
		// TODO Auto-generated method stub
		

		usr.afficherTexte(serviceRef.test());
	}

	@Override
	public void afficherContact(clientAffichage usr) throws RemoteException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void parlerAvec(clientAffichage usr, Contact contact)
			throws RemoteException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public boolean ajouterContact(clientAffichage usr, String nomContact)
			throws RemoteException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean deleteContact(clientAffichage usr, String nomContact)
			throws RemoteException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void modifierPassword(clientAffichage usr, String mdp)
			throws RemoteException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void modifierLogin(clientAffichage usr, String login)
			throws RemoteException {
		// TODO Auto-generated method stub
		
	}

}
